package user

import (
	"gxcvu-ai/pkg/database"
)

func Get(id string) (user User) {
	database.DB.Where("id = ?", id).First(&user)
	return
}

// 邮箱是否存在
func IsEmailExit(email string) bool {
	var count int64
	database.DB.Model(&User{}).Where("email = ?", email).Count(&count)
	return count > 0
}
